package xiao_jin.fantastic_journey;

import club.someoneice.cookie.event.EventBus;
import com.google.common.collect.Maps;
import net.fabricmc.api.ModInitializer;
import net.minecraft.item.ItemConvertible;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import xiao_jin.fantastic_journey.core.common.entity.RegistryEntity;
import xiao_jin.fantastic_journey.core.init.*;
import xiao_jin.fantastic_journey.server.event.EntityEvent;
import xiao_jin.fantastic_journey.server.event.ServerEvent;

import java.util.ArrayList;
import java.util.HashMap;

public final class FantasticJourney implements ModInitializer {
    public static final String MOD_ID = "fantastic_journey";
    public static final Logger LOGGER = LoggerFactory.getLogger(MOD_ID);

    public static final HashMap<ModItemGroup, ArrayList<ItemConvertible>> ITEM_GROUP_MAP = Maps.newHashMap();

    @Override
    public void onInitialize() {
        ModLootTableModifiers.modifyLootTables();
        ModFluids.registerFluids();
        ModBlockEntity.registerBlockEntityTypes();
        ModItems.registerModItem();
        ModBlocks.registerModBlocks();
        ModItemGroup.registerModItemGroup();
        ModToolMaterials.registerModToolMaterials();
        ModCapabilities.registerCapability();

        EventBus.register(EntityEvent.class);
        EventBus.register(ServerEvent.class);

        RegistryEntity.registryEntities();
    }
}